﻿using System.Data;
using Microsoft.Data.SqlClient;
using Microsoft.Extensions.Configuration;

namespace DapperDemo.Repository;

public class Db
{
	private readonly string _conn;

	public Db(IConfiguration config)
	{
		_conn = config.GetConnectionString("MsSQL");
	}

	public IDbConnection CreateConnection() => new SqlConnection(_conn);
}